import http from "@/common/http/index.js";

function login(name, pwd) {
  let params = { name: name, pwd: pwd };
  return http.get("/api/login", params);
}

function register(name, pwd) {
  let params = { name: name, pwd: pwd };
  return http.post("/api/register",params);
}

function nameExist(name) {
  let params = { name: name};
  return http.get("/api/nameExist", params);
}

export default {
  login,
  register,
  nameExist
};
